package com.iszhouhua.blog.controller.vue;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.iszhouhua.blog.common.util.Result;
import com.iszhouhua.blog.model.Link;
import com.iszhouhua.blog.service.LinkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("link")
public class LinkController {
  @Autowired
  private LinkService linkService;

  @GetMapping("list")
  public Result list() {
    List<Link> list = linkService.list(null);
    return Result.success("查询成功", list);
  }

}
